﻿namespace TimeMachine.Engine.Metrics.Impl
{
	public abstract class BaseMetric : IMetric
	{
		private MetricDescriptorAttribute desc;

		public MetricDescriptorAttribute Desc
		{
			get { return desc ?? (desc = GetType().GetMetadata<MetricDescriptorAttribute>()); }
		}

		public abstract MetricValue Calculate(int rev);
		public abstract IAggregator CreateAggregator();
	}
}